function [x_norm,y_norm] = normalize(x,y,length)
    x_norm=x;
    y_norm=y;
    length_ori=cal_len(x,y);
    
    factor=length/length_ori;
    x_norm(1)=(x_norm(1)-x_norm(2))*factor+x_norm(2);
    y_norm(1)=(y_norm(1)-y_norm(2))*factor+y_norm(2);
end